{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 获取财务数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>m_timetag</th>\n",
       "      <th>m_anntime</th>\n",
       "      <th>revenue_inc</th>\n",
       "      <th>earned_premium</th>\n",
       "      <th>real_estate_sales_income</th>\n",
       "      <th>total_operating_cost</th>\n",
       "      <th>real_estate_sales_cost</th>\n",
       "      <th>research_expenses</th>\n",
       "      <th>surrender_value</th>\n",
       "      <th>net_payments</th>\n",
       "      <th>...</th>\n",
       "      <th>net_inc_other_ops</th>\n",
       "      <th>plus_net_gain_chg_fv</th>\n",
       "      <th>plus_net_inc_other_bus</th>\n",
       "      <th>oper_exp</th>\n",
       "      <th>tot_compreh_inc</th>\n",
       "      <th>tot_compreh_inc_min_shrhldr</th>\n",
       "      <th>tot_compreh_inc_parent_comp</th>\n",
       "      <th>actual_ann_dt</th>\n",
       "      <th>operating_revenue</th>\n",
       "      <th>cost_of_goods_sold</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>20011231</td>\n",
       "      <td>20020417</td>\n",
       "      <td>1.618047e+09</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.009061e+09</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>20020331</td>\n",
       "      <td>20020429</td>\n",
       "      <td>7.180149e+08</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>3.808385e+08</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>20020630</td>\n",
       "      <td>20020814</td>\n",
       "      <td>9.556542e+08</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>5.545605e+08</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>20020930</td>\n",
       "      <td>20021029</td>\n",
       "      <td>1.363886e+09</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>8.382068e+08</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>20021231</td>\n",
       "      <td>20030326</td>\n",
       "      <td>1.834898e+09</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.189005e+09</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>105</th>\n",
       "      <td>20221231</td>\n",
       "      <td>20230331</td>\n",
       "      <td>1.240998e+11</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>3.974831e+10</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.351857e+08</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>106</th>\n",
       "      <td>20230331</td>\n",
       "      <td>20230426</td>\n",
       "      <td>3.875581e+10</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.071560e+10</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.295621e+07</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>107</th>\n",
       "      <td>20230630</td>\n",
       "      <td>20230803</td>\n",
       "      <td>6.957602e+10</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.117930e+10</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7.277068e+07</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>108</th>\n",
       "      <td>20230930</td>\n",
       "      <td>20231021</td>\n",
       "      <td>1.032684e+11</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>3.223569e+10</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.011260e+08</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>109</th>\n",
       "      <td>20231231</td>\n",
       "      <td>20240403</td>\n",
       "      <td>1.476936e+11</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.696089e+10</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.573719e+08</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>110 rows × 84 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    m_timetag m_anntime   revenue_inc  earned_premium  \\\n",
       "0    20011231  20020417  1.618047e+09             NaN   \n",
       "1    20020331  20020429  7.180149e+08             NaN   \n",
       "2    20020630  20020814  9.556542e+08             NaN   \n",
       "3    20020930  20021029  1.363886e+09             NaN   \n",
       "4    20021231  20030326  1.834898e+09             NaN   \n",
       "..        ...       ...           ...             ...   \n",
       "105  20221231  20230331  1.240998e+11             NaN   \n",
       "106  20230331  20230426  3.875581e+10             NaN   \n",
       "107  20230630  20230803  6.957602e+10             NaN   \n",
       "108  20230930  20231021  1.032684e+11             NaN   \n",
       "109  20231231  20240403  1.476936e+11             NaN   \n",
       "\n",
       "     real_estate_sales_income  total_operating_cost  real_estate_sales_cost  \\\n",
       "0                         NaN          1.009061e+09                     NaN   \n",
       "1                         NaN          3.808385e+08                     NaN   \n",
       "2                         NaN          5.545605e+08                     NaN   \n",
       "3                         NaN          8.382068e+08                     NaN   \n",
       "4                         NaN          1.189005e+09                     NaN   \n",
       "..                        ...                   ...                     ...   \n",
       "105                       NaN          3.974831e+10                     NaN   \n",
       "106                       NaN          1.071560e+10                     NaN   \n",
       "107                       NaN          2.117930e+10                     NaN   \n",
       "108                       NaN          3.223569e+10                     NaN   \n",
       "109                       NaN          4.696089e+10                     NaN   \n",
       "\n",
       "     research_expenses  surrender_value  net_payments  ...  net_inc_other_ops  \\\n",
       "0                  NaN              NaN           NaN  ...                0.0   \n",
       "1                  NaN              NaN           NaN  ...                0.0   \n",
       "2                  NaN              NaN           NaN  ...                0.0   \n",
       "3                  NaN              NaN           NaN  ...                0.0   \n",
       "4                  NaN              NaN           NaN  ...                0.0   \n",
       "..                 ...              ...           ...  ...                ...   \n",
       "105       1.351857e+08              NaN           NaN  ...                0.0   \n",
       "106       2.295621e+07              NaN           NaN  ...                0.0   \n",
       "107       7.277068e+07              NaN           NaN  ...                0.0   \n",
       "108       1.011260e+08              NaN           NaN  ...                0.0   \n",
       "109       1.573719e+08              NaN           NaN  ...                0.0   \n",
       "\n",
       "     plus_net_gain_chg_fv  plus_net_inc_other_bus  oper_exp  tot_compreh_inc  \\\n",
       "0                     0.0                     0.0       0.0              0.0   \n",
       "1                     0.0                     0.0       0.0              0.0   \n",
       "2                     0.0                     0.0       0.0              0.0   \n",
       "3                     0.0                     0.0       0.0              0.0   \n",
       "4                     0.0                     0.0       0.0              0.0   \n",
       "..                    ...                     ...       ...              ...   \n",
       "105                   0.0                     0.0       0.0              0.0   \n",
       "106                   0.0                     0.0       0.0              0.0   \n",
       "107                   0.0                     0.0       0.0              0.0   \n",
       "108                   0.0                     0.0       0.0              0.0   \n",
       "109                   0.0                     0.0       0.0              0.0   \n",
       "\n",
       "     tot_compreh_inc_min_shrhldr  tot_compreh_inc_parent_comp  actual_ann_dt  \\\n",
       "0                            0.0                          0.0            0.0   \n",
       "1                            0.0                          0.0            0.0   \n",
       "2                            0.0                          0.0            0.0   \n",
       "3                            0.0                          0.0            0.0   \n",
       "4                            0.0                          0.0            0.0   \n",
       "..                           ...                          ...            ...   \n",
       "105                          0.0                          0.0            0.0   \n",
       "106                          0.0                          0.0            0.0   \n",
       "107                          0.0                          0.0            0.0   \n",
       "108                          0.0                          0.0            0.0   \n",
       "109                          0.0                          0.0            0.0   \n",
       "\n",
       "     operating_revenue  cost_of_goods_sold  \n",
       "0                  0.0                 0.0  \n",
       "1                  0.0                 0.0  \n",
       "2                  0.0                 0.0  \n",
       "3                  0.0                 0.0  \n",
       "4                  0.0                 0.0  \n",
       "..                 ...                 ...  \n",
       "105                0.0                 0.0  \n",
       "106                0.0                 0.0  \n",
       "107                0.0                 0.0  \n",
       "108                0.0                 0.0  \n",
       "109                0.0                 0.0  \n",
       "\n",
       "[110 rows x 84 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from xtquant import xtdata\n",
    "\n",
    "table_list = ['Balance','Income','CashFlow','Capital','Top10FlowHolder','Top10Holder','HolderNum','PershareIndex']\n",
    "\n",
    "xtdata.download_financial_data(stock_list=['600519.SH'], table_list=table_list)\n",
    "\n",
    "res = xtdata.get_financial_data(stock_list=['600519.SH'], table_list=table_list)\n",
    "\n",
    "df = res['600519.SH']['Income']\n",
    "\n",
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 过滤时间"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>m_timetag</th>\n",
       "      <th>m_anntime</th>\n",
       "      <th>internal_shoule_recv</th>\n",
       "      <th>fixed_capital_clearance</th>\n",
       "      <th>should_pay_money</th>\n",
       "      <th>settlement_payment</th>\n",
       "      <th>receivable_premium</th>\n",
       "      <th>accounts_receivable_reinsurance</th>\n",
       "      <th>reinsurance_contract_reserve</th>\n",
       "      <th>dividends_payable</th>\n",
       "      <th>...</th>\n",
       "      <th>m_guaranteeInvestmentFunds</th>\n",
       "      <th>m_premiumsReceivedAdvance</th>\n",
       "      <th>m_insuranceLiabilities</th>\n",
       "      <th>m_liabilitiesIndependentAccounts</th>\n",
       "      <th>m_liabilitiesVicariousBusiness</th>\n",
       "      <th>m_otherLiablities</th>\n",
       "      <th>m_capitalPremium</th>\n",
       "      <th>m_petainedProfit</th>\n",
       "      <th>m_provisionTransactionRisk</th>\n",
       "      <th>m_otherReserves</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>20220331</td>\n",
       "      <td>20220427</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>20220630</td>\n",
       "      <td>20220803</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>20220930</td>\n",
       "      <td>20221017</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>20221231</td>\n",
       "      <td>20230331</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>20221231</td>\n",
       "      <td>20230426</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>20221231</td>\n",
       "      <td>20230803</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>20221231</td>\n",
       "      <td>20231021</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>7 rows × 146 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "  m_timetag m_anntime  internal_shoule_recv  fixed_capital_clearance  \\\n",
       "0  20220331  20220427                   NaN                      NaN   \n",
       "1  20220630  20220803                   NaN                      NaN   \n",
       "2  20220930  20221017                   NaN                      NaN   \n",
       "3  20221231  20230331                   NaN                      NaN   \n",
       "4  20221231  20230426                   NaN                      NaN   \n",
       "5  20221231  20230803                   NaN                      NaN   \n",
       "6  20221231  20231021                   NaN                      NaN   \n",
       "\n",
       "   should_pay_money  settlement_payment  receivable_premium  \\\n",
       "0               NaN                 NaN                 NaN   \n",
       "1               NaN                 NaN                 NaN   \n",
       "2               NaN                 NaN                 NaN   \n",
       "3               NaN                 NaN                 NaN   \n",
       "4               NaN                 NaN                 NaN   \n",
       "5               NaN                 NaN                 NaN   \n",
       "6               NaN                 NaN                 NaN   \n",
       "\n",
       "   accounts_receivable_reinsurance  reinsurance_contract_reserve  \\\n",
       "0                              NaN                           NaN   \n",
       "1                              NaN                           NaN   \n",
       "2                              NaN                           NaN   \n",
       "3                              NaN                           NaN   \n",
       "4                              NaN                           NaN   \n",
       "5                              NaN                           NaN   \n",
       "6                              NaN                           NaN   \n",
       "\n",
       "   dividends_payable  ...  m_guaranteeInvestmentFunds  \\\n",
       "0                NaN  ...                         NaN   \n",
       "1                NaN  ...                         NaN   \n",
       "2                NaN  ...                         NaN   \n",
       "3                NaN  ...                         NaN   \n",
       "4                NaN  ...                         NaN   \n",
       "5                NaN  ...                         NaN   \n",
       "6                NaN  ...                         NaN   \n",
       "\n",
       "   m_premiumsReceivedAdvance  m_insuranceLiabilities  \\\n",
       "0                        NaN                     NaN   \n",
       "1                        NaN                     NaN   \n",
       "2                        NaN                     NaN   \n",
       "3                        NaN                     NaN   \n",
       "4                        NaN                     NaN   \n",
       "5                        NaN                     NaN   \n",
       "6                        NaN                     NaN   \n",
       "\n",
       "   m_liabilitiesIndependentAccounts  m_liabilitiesVicariousBusiness  \\\n",
       "0                               NaN                             NaN   \n",
       "1                               NaN                             NaN   \n",
       "2                               NaN                             NaN   \n",
       "3                               NaN                             NaN   \n",
       "4                               NaN                             NaN   \n",
       "5                               NaN                             NaN   \n",
       "6                               NaN                             NaN   \n",
       "\n",
       "   m_otherLiablities  m_capitalPremium  m_petainedProfit  \\\n",
       "0                NaN               NaN               NaN   \n",
       "1                NaN               NaN               NaN   \n",
       "2                NaN               NaN               NaN   \n",
       "3                NaN               NaN               NaN   \n",
       "4                NaN               NaN               NaN   \n",
       "5                NaN               NaN               NaN   \n",
       "6                NaN               NaN               NaN   \n",
       "\n",
       "   m_provisionTransactionRisk  m_otherReserves  \n",
       "0                         NaN              NaN  \n",
       "1                         NaN              NaN  \n",
       "2                         NaN              NaN  \n",
       "3                         NaN              NaN  \n",
       "4                         NaN              NaN  \n",
       "5                         NaN              NaN  \n",
       "6                         NaN              NaN  \n",
       "\n",
       "[7 rows x 146 columns]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "xtdata.download_financial_data(stock_list=['600519.SH'], table_list=table_list)\n",
    "\n",
    "res = xtdata.get_financial_data(stock_list=['600519.SH'], table_list=table_list, start_time='20220101', end_time='20230101', report_type='announce_time')\n",
    "\n",
    "df = res['600519.SH']['Balance']\n",
    "\n",
    "df"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "miniqmt-demo-cptEsqYo-py3.10",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
